﻿Imports DTO
Public Class LuongDAO
    Public Function TinhLuong(ByVal m As Integer, ByVal y As Integer) As DataTable
        Dim sql As String = String.Format("exec TinhLuong {0},{1}", m, y)
        DataProvider.ExcuteQuery(sql)
        sql = String.Format("select * from Luong l, NhanVien nv where Thang = {0} and Nam = {1} and l.MaNV = nv.MaNV ", m, y)
        Dim dt As DataTable
        dt = DataProvider.LoadSQL(sql)
        Return dt
    End Function
    Public Sub UngTien(ByVal manv As String)
        Dim sql As String = String.Format("update Luong set Dot1 = Luong*70/100 where MaNV = {0}", manv)
        DataProvider.ExcuteQuery(sql)
    End Sub
    Public Sub TraTien(ByVal m As Integer, ByVal y As Integer)
        Dim sql As String = String.Format("exec TraLuong {0},{1}", m, y)
        DataProvider.ExcuteQuery(sql)
    End Sub
End Class
